﻿using System;

namespace InfiniTec.Threading
{
	public class CpuResourceConstraint: IResourceConstraint
	{
		public static IResourceConstraint Default = new CpuResourceConstraint();

		private CpuResourceConstraint() {}
		public int AllowedParalellOperations { get { return Environment.ProcessorCount; } }

		public bool Equals(IResourceConstraint other)
		{
			return other is CpuResourceConstraint;
		}
	}
}